<template>
	<view class="pt70 pd">
		<view class="khjhnnderr row pl70 ">
			<view class="col fz30 cf">
				解锁控制面板
			</view>
			<switch :checked="isxzs"  @change="switchChange"/>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				isxzs: false
			}
		},
		components: {
			
		},
		methods: {
			 switchChange (e) {
				let value = e.target.value
				let that = this
				if (value) {
					this.dengljse()
				}
			},
			async dengljse() {
				let cs = {}
				cs.type = 1
				cs.value = 'zhiwen'
				cs.name = 'zhiwen'
				let jhsd = await this.post("/api/lock"  , cs)
				uni.showToast({
					title:'指纹解锁已开启'
				})
				let locks = {type:0,vaule:''}
				uni.setStorageSync('locks',locks)
				uni.navigateBack({
					delta:1
				})
			}
		},
		mounted() {
			
		}
	}
</script>
<style scoped>
	.khjhnnderr{
		height:140upx;
		line-height: 140upx;
		background:rgba(53,60,81,1);
		border-radius:12upx;
	}
</style>
